package com.gykj.rtm.feign.fallback;

import java.util.List;

import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageInfo;
import com.gykj.admin.common.constants.RespResultConstants;
import com.gykj.admin.common.entity.User;
import com.gykj.admin.common.entity.UserRole;
import com.gykj.admin.common.resp.RespResultJson;
import com.gykj.rtm.facade.admin.UserFacade;

@Component
public class UserFacadeHystrixImpl implements UserFacade {

	@Override
	public PageInfo<User> getAllUserList(
    		User user,
            @RequestParam(value="currentPage",required = false, defaultValue = "1") int currentPage,
            @RequestParam(value="pageSize",required = false, defaultValue = "20") int pageSize,
            @RequestParam(value="sortColumn",required = false, defaultValue = "1") int sortColumn,
            @RequestParam(value="sortDesc",required = false, defaultValue = "1") int sortDesc) {
		return null;
	}

	@Override
	public RespResultJson saveUserRoles(@RequestBody UserRole userRole) {
		return null;
	}

	@Override
	public RespResultJson addUser(@RequestBody User user) {
	System.out.println("add::"+UserFacadeHystrixImpl.class.getName());
	RespResultJson result = new RespResultJson();
	result.setStatus(RespResultConstants.F);
	result.setMessage(UserFacadeHystrixImpl.class.getName() + " return error!");
	return result;
	}

	@Override
	public RespResultJson deleteUser(@RequestParam(value="id",required=false) Integer id) {
		return null;
	}

	@Override
	public List<User> getUserById(Integer uid) {
		// TODO Auto-generated method stub
		return null;
	}

}
